'''
Created on 2012-6-20

@author: wb_suoyao.shen
'''
from django.conf.urls.defaults import patterns,url

# login urls
urlpatterns = patterns('ssyblog.cms.views',
    url(r'^$','index'),
    url(r'^index/$','index'),
    url(r'^login/$','login'),
    url(r'^signup/$','signup'),
    url(r'^signout/$','signout'),
)

# tags urls
urlpatterns += patterns('ssyblog.cms.tagsview',
    url(r'^tagsList/(?P<recommend>.*)/$','queryTags'),
    url(r'^addTags/$','addTags'),
    url(r'^saveTags/$','saveTags'),
    url(r'^editTags/(?P<tagId>\d+)/(?P<recommend>.*)/$','editTags'),
    url(r'^updateTags/(?P<tagId>\d*)/(?P<recommend>.*)/$','updateTags'),
    url(r'^deleteTags/(?P<tagId>\d+)/(?P<recommend>.*)/$','deleteTags'),
    url(r'^recommendTags/(?P<tagId>\d+)/(?P<recommend>.*)/$','recommendTags'),
)

# diary urls
urlpatterns += patterns('ssyblog.cms.diaryview',
    url(r'^addDiary/$','addDiary'),
    url(r'^diaryList/$','queryDiary'),
    url(r'^commentList/$','queryComment'),
    url(r'^saveDiary/$','saveDiary'),
    url(r'^editDiary/(?P<diaryId>\d*)$','editDiary'),
    url(r'^updateDiary/(?P<diaryId>\d*)$','updateDiary'),
    url(r'^deleteDiary/(?P<diaryId>\d*)$','deleteDiary'),
    url(r'^recommendDiary/(?P<diaryId>\d*)$','recommendDiary'),
    url(r'^uploadFile/(.*)','uploadFile'),
)

# about me urls
urlpatterns += patterns('ssyblog.cms.adminview',
    url(r'^aboutMe/$','aboutMe'),
    url(r'^saveAboutMe/(?P<aboutId>.*)/$','saveAboutMe'),
)

# photos album urls
urlpatterns += patterns('ssyblog.cms.albumview',
    url(r'^albumList/$','queryAlbums'),
    url(r'^addAlbum/$','addAlbum'),
    url(r'^saveAlbum/$','saveAlbum'),
    url(r'^editAlbum/(?P<albumId>\d+)/$','editAlbum'),
    url(r'^updateAlbum/(?P<albumId>\d*)/$','updateAlbum'),
)

# photos urls
urlpatterns += patterns('ssyblog.cms.photosview',
    url(r'^photosAlbum/$','photosAlbum'),
    url(r'^addPhotos/(?P<albumId>\d+)/$','addPhotos'),
    url(r'^uploadImg/(?P<folder>.*)/$','uploadImg'),
)

#recommend links urls
urlpatterns += patterns('ssyblog.cms.linksview',
    url(r'^linksList/$','queryLinks'),
    url(r'^addLinks/$','addLinks'),
    url(r'^saveLinks/$','saveLinks'),
    url(r'^deleteLinks/(?P<linkId>\d+)/$','deleteLinks'),
    url(r'^deleteLinksBatch/$','deleteLinksBatch'),
)